package com.lantosec.hmrp.modules.morality.vo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.lantosec.hmrp.modules.morality.entity.MoralityCommentTemplate;
import com.lantosec.hmrp.core.mvc.BaseVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * <p>
 * 评语模板定义 VO对象
 * </p>
 *
 * @author AutoCode
 * @since 2020-04-17
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value="MoralityCommentTemplate对象", description="评语模板定义")
public class MoralityCommentTemplateVO extends BaseVO<MoralityCommentTemplate> {
    private static final long serialVersionUID = 1L;


    public MoralityCommentTemplateVO(MoralityCommentTemplate entity){
        this.commentTemplateId = entity.getCommentTemplateId();
        this.commentTemplateName = entity.getCommentTemplateName();
        this.moralityStep = entity.getMoralityStep();
        this.commentContent = entity.getCommentContent();
    }

    @Override
    public MoralityCommentTemplate convertToEntity(){
        return new MoralityCommentTemplate(this);
    }


    @ApiModelProperty(value = "评语模板ID")
    @TableId(value = "comment_template_id", type = IdType.AUTO)
    private Integer commentTemplateId;

    @ApiModelProperty(value = "评语模板名称")
    private String commentTemplateName;

    @ApiModelProperty(value = "考评环节(1自评 2科室 3党支部 4考评委员会)")
    private Integer moralityStep;

    @ApiModelProperty(value = "评语内容")
    private String commentContent;


}
